#!/usr/bin/python
# -*- coding:utf-8 -*-
# @author  : micah
# @time    :  
# @function: 
# @version :


# 电商商城商品翻页
class Page:
    def __init__(self, current_page):
        # 页数
        self.current_page = current_page
        # 每页显示的数据量
        self.page_items = 10

    @property
    def start(self):
        value = (self.current_page - 1) * self.page_items
        return value

    @property
    def end(self):
        value = self.current_page * self.page_items
        return value


p = Page(2)
print(p.start)
print(p.end)

